<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    div {
      width: 600px;
      height: 600px;
      border: 1px solid #000;

      /* 如果以下两者同时存在，则不能把background-size写在上面 */
      /* 因为background: color image repeat position/size中，size有默认值，会覆盖掉写在上面的background-size */
      /* background-size: 400px 400px; */
      background: url(../day07代码/07案例.jpg) no-repeat center center;
      background-size: 400px 400px;
      
      /* 或者直接全部连写 */
      background: url(../day07代码/07案例.jpg) no-repeat center center/400px 400px;
    }
  </style>
</head>
<body>
  <div></div>
</body>
</html>